package com.component.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.component.domain.MModel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.component.domain.vo.ModelChannelVo;

import java.util.List;
import java.util.Map;


/**
 *
 */
public interface MModelService extends IService<MModel> {

    IPage<MModel> page(Integer pageNumber,Integer pageSize,String title);

    boolean bindChannelModel(ModelChannelVo vo);

    List<String> getComponentsByModel(MModel mModel);

    List<String> getComponentsByArray(JSONArray array);

    List<String> getTablesByModel(MModel mModel);

    List<String> getTablesByArray(JSONArray array);

    String getModelDefaultValue(MModel mModel);

    String getModelDefaultValueByArr(JSONArray array);

    JSONArray getTableLabelByModel(JSONArray array);

    List<Map<String,String>> getTableLabelByModel(MModel mModel);

    List<String> getTableFieldsByModel(MModel mModel);

    List<String> getSumTableFieldsByModel(MModel mModel);

    Map<String,String> getAllFormulations(MModel mModel);

    Map<String,String> getAllFormulations(JSONArray array);

    void formulationsDealData(Map<String,String>map,JSONArray array);

    JSONArray getModelArray(MModel mModel);

    JSONArray getArrayByModelDataType(JSONArray array,JSONArray model);

    void sort(JSONArray model);

}
